package com.grape.vo;

import com.grape.constants.Constants;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collection;
import java.util.List;

/**
 * 类描述： UserVo类
 *
 * @author  putao
 * @email   2628279194@qq.com
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserVO {

    /** 用户id */
    @ApiModelProperty(value = "用户id")
    private String id;

    /** 用户头像 */
    @ApiModelProperty(value = "用户头像")
    private String avatar;

    /** 用户名 */
    @ApiModelProperty(value = "用户名")
    private String username;

    /** 手机号码 */
    @ApiModelProperty(value = "手机号码")
    private String phone;

    /** 唯一id */
    @ApiModelProperty(value = "唯一id")
    private String uniqueId;

    /** 令牌 */
    @ApiModelProperty(value = "令牌")
    private String token;

    /** 失效时间 */
    @ApiModelProperty(value = "失效时间")
    private Long expireTime;

    /** uuid */
    @ApiModelProperty(value = "uuid")
    private String uuid;

    /** 是否管理员 */
    @ApiModelProperty(value = "是否管理员")
    private String isAdmin;

    /** 角色集合 */
    private Collection<String> authorities;

    /** 角色集合 */
    private List<String> roleList;

    /** 权限集合 */
    private List<String> permissionList;

    public static UserVO createSystemUserVo() {
        UserVO userVo = new UserVO();
        userVo.setUsername("系统通知");
        userVo.setId(Constants.NO_STR);
        return userVo;
    }
}
